<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0px;
            padding: 0px;
        }
        div{
            width: 500px;
            height: 500px;
            background-color: blue;
            /* position: relative; */
            display: flex;

        }
        div p{
            width: 100px;
            height: 100px;
            background-color: red;
            /* margin: auto; */
            /* position: absolute;
            top: 0px;
            left: 0px;
            right: 0px;
            bottom: 0px; */
            /* left: 50%;
            top: 50%;
            margin-top: -50px;
            margin-left: -50px; */
            margin: auto;
        }
    </style>
</head>
<body>
    <div>
        <p></p>
    </div>
</body>
</html>